/**
 * 应用常量配置
 */

// 应用信息
export const APP_INFO = {
  name: '水务工程管控系统',
  version: '2.0.0',
  description: '专业的水务工程巡查监管平台'
}

// 巡查类型
export const PATROL_TYPES = {
  CIVILIZATION: { code: '01', name: '文明施工', color: '#1890ff' },
  SAFETY: { code: '02', name: '安全监督', color: '#52c41a' },
  QUALITY: { code: '03', name: '质量管理', color: '#faad14' }
}

// 巡查结果
export const PATROL_RESULTS = {
  QUALIFIED: { code: '合格', name: '合格', color: '#52c41a' },
  UNQUALIFIED: { code: '不合格', name: '不合格', color: '#ff4d4f' }
}

// 流程节点状态
export const FLOW_NODES = {
  PENDING: { code: '00', name: '待提交', color: '#faad14' },
  LEVEL1_REVIEW: { code: '16', name: '一级复查', color: '#1890ff' },
  LEVEL2_REVIEW: { code: '22', name: '二级复查', color: '#722ed1' },
  LEVEL2_APPROVE: { code: '23', name: '二级审批', color: '#eb2f96' },
  RECTIFY: { code: '50', name: '整改处理', color: '#f5222d' },
  COMPLETED: { code: '99', name: '已完成', color: '#52c41a' }
}

// 用户角色
export const USER_ROLES = {
  SUPERVISOR: '建设方项目负责人',
  MANAGER: '质监站科员',
  QUALITY_MANAGER: '施工方项目负责人',
  SAFETY_MANAGER: '质监站科员',
  SITE_MANAGER: '质监站负责人',
  ADMIN:'信息管理员'
}

// 分页配置
export const PAGINATION = {
  DEFAULT_PAGE_SIZE: 10,
  MAX_PAGE_SIZE: 50
}

// 地图配置
export const MAP_CONFIG = {
  DEFAULT_SCALE: 15,
  MARKER_WIDTH: 36,
  MARKER_HEIGHT: 36,
  AMAP_KEY: 'c2229c267ab959096357ce71eb0a8e7d'
}

// 文件上传配置
export const UPLOAD_CONFIG = {
  MAX_SIZE: 10 * 1024 * 1024, // 10MB
  ALLOWED_TYPES: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf'],
  MAX_COUNT: 9
}

// 缓存键名
export const STORAGE_KEYS = {
  USER_INFO: 'user',
  TOKEN: 'cookie',
  LOCATION: 'location',
  THEME: 'theme'
}

// API 状态码
export const API_CODES = {
  SUCCESS: '200',
  UNAUTHORIZED: '401',
  FORBIDDEN: '403',
  NOT_FOUND: '404',
  SERVER_ERROR: '500'
}